package com.niit;

import com.niit.service.DeptService;
import com.niit.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAop {
    public static void main(String[] args) {

        ApplicationContext ctx = new
                ClassPathXmlApplicationContext(
                        "spring-beans.xml");

        UserService userService = ctx.getBean(UserService.class);

        userService.getUserById("1111");

        userService.deleteUserById("2222");

//        DeptService deptService = ctx.getBean(DeptService.class);
//        deptService.getDeptById("3333");
//        deptService.deletDeptById("4444");
    }
}
